

#ifndef _CGAME_H_
#define _CGAME_H_

#include "IGameState.h"
#include "CMainMenuState.h"

#include "../SGD Wrappers/CSGD_Direct3D.h"
#include "../SGD Wrappers/CSGD_DirectInput.h"
#include "../SGD Wrappers/CSGD_DirectSound.h"
#include "../SGD Wrappers/CSGD_TextureManager.h"
#include "../SGD Wrappers/CSGD_WaveManager.h"

class CGame
{
private:

	IGameState* m_pCurrentState;

	//	SGD singleton pointers:
	CSGD_Direct3D*			m_pD3D;
	CSGD_DirectInput*		m_pDI;
	CSGD_DirectSound*		m_pDS;
	CSGD_TextureManager*	m_pTM;
	CSGD_WaveManager*		m_pWM;
	
	//Windowed Mode
	bool m_bIsWindowed;
	//Resource ids:
	int m_nImageID;
	int m_nSoundID;
	
	int m_nMusicVolume;
	int m_nSFXVolume;
	int m_nMusicPanning;

	//Screen height and width
	int m_nScreenWidth, m_nScreenHeight;
	//	Constructor
	CGame(void);

	//	Trilogy of EVIL
	//	Copy constructor
	CGame(const CGame&);
	//	Assingment operator
	CGame& operator=(const CGame&);
	//	Destructor
	~CGame(void);

public:

	static CGame* GetInstance(void);

	//	3 main steps a game goes through in its lifetime:
	//	Initialization
	void Initialize(HWND hWnd, HINSTANCE hInstance, int nScreenWidth, int nScreenHeight, bool bIsWindowed);

	//	Execution
	bool Main(void);

	//	Clean up
	void Shutdown(void);

	void ChangeState(IGameState* NewState);

	/////////////////////////////////////////////////////////
	//	Function:	GetInput
	//	Purpose:	Gets player input
	/////////////////////////////////////////////////////////
	void GetInput();

	int GetMusicVolume(){return m_nMusicVolume;}
	int GetSFXVolume(){return m_nSFXVolume;}
	int GetMusicPanning(){return m_nMusicPanning;}

	void SetMusicVolume(int Volume){m_nMusicVolume = Volume;}
	void SetSFXVolume(int Volume){m_nSFXVolume = Volume;}
	void SetMusicPanning(int Pan){m_nMusicPanning = Pan;}
};


#endif